{extend name="layout:default"}
{block name="title"}仓库列表{/block}
{block name="content"}
<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header">
                <h3 class="box-title">仓库列表</h3>
                <div class="box-tools">
                    <a href="{:url('storage')}" class="btn btn-primary" style="float: left; margin-left: 40px"> 入库 </a>
                    <a href="{:url('out')}" class="btn btn-danger" style="float: left; margin: 20px;margin-top: 0px"> 出库 </a>
                    <form class="form-inline" method="get" style="float: right;margin-right: 100px">
                            开始时间:<input type="date" name="start_time" class="form-control" placeholder="开始时间">至
                            结束时间:<input type="date" name="end_time" class="form-control" placeholder="结束时间">
                        <input type="submit" class="btn btn-success" value="搜索"></input>
                    </form>
                </div>
            </div>
            <!-- /.box-header -->
            <div class="box-body table-responsive no-padding">
                <table class="table table-hover">
                    <tbody>
                    <tr>
                        <th>ID</th>
                        <th>接单员</th>
                        <th>开单员</th>
                        <th>所属店铺</th>
                        <th>项目名称</th>
                        <th>规格信息</th>
                        <th>数量</th>
                        <th>库存</th>
                        <th>入库/出库</th>
                        <th>区域</th>
                        <th>出入库时间</th>
                        <th>操作</th>
                    </tr>
                    {volist name="historys" id="vo"}
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.realname}</td>
                        <td>{$vo.realname}</td>
                        <td>{$vo.shop_name}</td>
                        <td>{$vo.name}</td>
                        <td>{$vo.info}</td>
                        <td>{$vo.num}</td>
                        <td>{$vo.sum}</td>
                        <td>
                            {switch name="$vo.status" }
                            {case value="0"}入库{/case}
                            {case value="1"}出库{/case}
                            {/switch}
                        </td>
                        <td>
                            {switch name="$vo.address" }
                            {case value="1"}内场{/case}
                            {case value="2"}外场{/case}
                            {/switch}
                        </td>
                        <td>{:date('Y-m-d H:i:s',$vo.time)}</td>
                        <td>
                            <!--{if condition="$vo.status eq 0" }-->
                            <!--<a title="入库" href="{:url('check',['id'=>$vo.id])}" class="btn btn-primary"><i-->
                                    <!--class="glyphicon glyphicon-exclamation-sign" style="color: white"></i></a>-->
                            <!--{else /}-->
                            <!--{/if}-->
                            <a title="编辑" href="{:url('edit',['id'=>$vo.id])}" class="btn btn-primary"><i
                                    class="glyphicon glyphicon-edit"></i></a>
                            <a title="删除" href="{:url('del',['id'=>$vo.id])}" class="btn btn-danger"><i
                                    class="glyphicon glyphicon-trash"></i></a>
                        </td>
                    </tr>
                    {/volist}
                    </tbody>
                </table>
                {$historys->render()}
            </div>
            <!-- /.box-body -->
        </div>
        <!-- /.box -->
    </div>
</div>
{/block}